// <% if Rails.env.development? %>
  // show errors instantly so we can catch them early and fix
  window.onerror = function(msg, url, line, col, error) {
    var extra = !col ? '' : '\ncolumn: ' + col;
    extra += !error ? '' : '\nerror: ' + error;
    alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);
  };
// <% end %>
